Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vmware3 #476

Merged
merged 4 commits into from
Feb 8, 2025
Merged

Vmware3 #476

merged 4 commits into from
Feb 8, 2025

Conversation

fysnet
Copy link
Collaborator

@fysnet fysnet commented Feb 6, 2025

If the vmware3 class doesn't find a valid vmware3 image file, it will exit without removing the .lock file. A simple addition of

  bx_close_image(file_descriptor, pathname);

at line 257 would fix it:

/* Read the header */
if (!read_header(file, header)) {
BX_PANIC(("unable to read vmware3 COW Disk header or invalid header from file '%s'", pathname));
return -1;
}

However, to be more consistent with vmware4 I have tried to add a more consistent solution. I did not check to see if this works with a valid vmware3 file. I have none to test with. Please test...

If the vmware3 class doesn't find a valid vmware3 image file, it will exit without removing the .lock file.
A simple add of
```
  bx_close_image(file_descriptor, pathname);
```
at line 257 would fix it:
https://github.com/bochs-emu/Bochs/blob/57020b856d88c2316ea0e77fb4a63d0b2b9c7e31/bochs/iodev/hdimage/vmware3.cc#L255-L259

However, to be more consistent with vmware4 I have tried to add a more consistent solution.
minor change, remove redundant initialization.
@vruppert
Copy link
Contributor

vruppert commented Feb 8, 2025

I haven't found an image for testing, but it compiles and looks okay to me.

@vruppert vruppert merged commit 10f7a94 into bochs-emu:master Feb 8, 2025
3 checks passed
@fysnet fysnet deleted the vmware3 branch February 8, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants